package com.epoch.service.impl;

import com.epoch.entity.Course;
import com.epoch.dao.CourseDao;
import com.epoch.service.CourseService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author admin
 */
@Service
@Slf4j
public class CourseServiceImpl implements CourseService {
    @Autowired
    private CourseDao courseDao;


    @Override
    public Course getCourseById(String courseId) {
        log.info("CourseServiceImpl: "+courseId);
        return courseDao.getCourseById(courseId);
    }

    @Override
    public List<Course> getCourseByTypeId(String typeId) {
        log.info("CourseServiceImpl: "+typeId);
        return courseDao.getCourseByTypeId(typeId);
    }
}
